<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="be.ac.ua.ecampus.cmat.types.Entity, java.util.Collection" %>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<title>Search</title>
	<link rel="stylesheet" type="text/css" href="style.css"/>
</head>

<body>
<header>
	<h1>Search</h1>
</header>

<div id="body-wrapper">
	<h2>Result</h2>
	<ul>
		<% final Collection<Entity> results = (Collection<Entity>) request.getAttribute("search"); %>
		<% for (final Entity result : results) { %>
	        <li>
	        	<a href="/CMAT_NEW/show?type=<%= result.getType() %>&id=<%= result.getId() %>"><%= result.getDescription() %></a>
	        </li>
	    <% } %>
	</ul>
	
</div>
</body>
</html>